package com.example.hospital_208.dao;

import com.example.hospital_208.po.MedicalRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MedicalRecordMapper {
    // 查询所有病历
    List<MedicalRecord> findAllMedicalRecords();
    MedicalRecord findMedicalRecordByUserId(Integer userId);
    // 根据 ID 查询病历
    MedicalRecord findMedicalRecordById(Integer recordId);

    // 新增病历
    int insertMedicalRecord(MedicalRecord medicalRecord);

    // 修改病历
    int updateMedicalRecord(MedicalRecord medicalRecord);

    // 根据 ID 删除病历
    int deleteMedicalRecordById(Integer recordId);
}